define(function () {
    "use strict";
    return function(user){
      class Load {
        constructor(a) {
            this.a = a;
            this.addEvent()
        }
        addEvent(){
            if (this.a != 2) {
                if (confirm("亲，您还没有登陆，是否去登录？")) {
                    location.href = "./login.html";
                } else {
                    location.href = "./index.html";
                }
            }else{
                $("#user").html(user);
            }
        }
    }
    new Load(document.cookie.split("=")[2]);
    }
  });